package com.xmg.server.goods.service.impl;

import com.xmg.server.goods.mapper.ProductCatalogPropertyValueMapper;
import com.xmg.shop.api.domain.ProductCatalogPropertyValue;
import com.xmg.shop.api.service.IProductCatalogPropertyValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by lenovo on 2017/11/17.
 */
@Service
public class ProductCatalogPropertyValueServiceImpl implements IProductCatalogPropertyValueService {

    @Autowired
    private ProductCatalogPropertyValueMapper productCatalogPropertyValueMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return productCatalogPropertyValueMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int save(ProductCatalogPropertyValue record) {
        return productCatalogPropertyValueMapper.insert(record);
    }

    @Override
    public ProductCatalogPropertyValue selectByPrimaryKey(Long id) {
        return productCatalogPropertyValueMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<ProductCatalogPropertyValue> selectAll() {
        return productCatalogPropertyValueMapper.selectAll();
    }

    @Override
    public List<ProductCatalogPropertyValue> getPropertyByProductId(Long productId) {
        return productCatalogPropertyValueMapper.getPropertyByProductId(productId);
    }

    @Override
    public List<ProductCatalogPropertyValue> selectCatalogPropertyValue(Long productId) {
        return this.productCatalogPropertyValueMapper.selectCatalogPropertyValue(productId);
    }
}
